﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data.SqlClient;

using JM.JCY.BusinessEntity;
using JM.JCY.Common;
using System.Data;
using JM.JCY.BusinessEntity.PPSM2007;
using JM.JCY.BusinessEntity.PPSM2007.PPSMUserEduInfoDataSetTableAdapters;
using JM.JCY.BusinessEntity.PPSM2007.PPSMUserInfoDataSetTableAdapters;
using JM.JCY.BusinessEntity.PPSM2007.PPSMUserRelationDataSetTableAdapters;
using JM.JCY.BusinessEntity.PPSM2007.PPSMUserAssessmentDataSetTableAdapters;

namespace JM.JCY.DataAccess
{
    public class PPSM2007DA : JCYDataAccessBasecs
    {
        public PPSMUserInfoDataSet.UserInfoDataTable GetUserInfoByName(string userName)
        {
            var userInfoDT = new PPSMUserInfoDataSet.UserInfoDataTable();
            var ad = new UserInfoTableAdapter();
            userInfoDT = ad.GetUserInfoData(userName);
            return userInfoDT;
        }

        public PPSMUserInfoDataSet.UserCareerDataTable GetCareerByName(string userName)
        {
            var userInfoDT = new PPSMUserInfoDataSet.UserCareerDataTable();
            var ad = new UserCareerTableAdapter();
            userInfoDT = ad.GetUserCareerByUserName(userName);
            return userInfoDT;
            
        }
        public PPSMUserEduInfoDataSet.UserEduInfoDataTable GetEduInfoByName(string userName)
        {
            var userEduDT = new PPSMUserEduInfoDataSet.UserEduInfoDataTable();
            var ad = new UserEduInfoTableAdapter();
            userEduDT = ad.GetUserEduInfoDataByUserName(userName);
            return userEduDT;
        }

        public PPSMUserEduInfoDataSet.UserTrainDataTable GetTrainInfoByName(string userName)
        {
            var userEduDT = new PPSMUserEduInfoDataSet.UserTrainDataTable();
            var ad = new UserTrainTableAdapter();
            userEduDT = ad.GetUserTrainData(userName);
            return userEduDT;
        }

        public PPSMUserRelationDataSet.UserRelationDataTable GetRelationInfoByName(string userName)
        {
            var userRelationDT = new PPSMUserRelationDataSet.UserRelationDataTable();
            var ad = new UserRelationTableAdapter();
            userRelationDT = ad.GetUserRelationDataByUserName(userName);
            return userRelationDT;
        }

        public PPSMUserAssessmentDataSet.UserAssessmentDataTable GeAssessmentInfoByName(string userName)
        {
            var userAssessmentDT = new PPSMUserAssessmentDataSet.UserAssessmentDataTable();
            var ad = new UserAssessmentTableAdapter();
            userAssessmentDT = ad.GetAssessmentDataByName(userName);
            return userAssessmentDT;
        }

        public PPSMUserAssessmentDataSet.UserGloryDataTable GeGloryInfoByName(string userName)
        {
            var userGloryDT = new PPSMUserAssessmentDataSet.UserGloryDataTable();
            var ad = new UserGloryTableAdapter();
            userGloryDT = ad.GetUserGloryDataByName(userName);
            return userGloryDT;
        }

        public PPSMUserAssessmentDataSet.UserPunishInfoDataTable GetPunishInfoByName(string userName)
        {
            var userPunishDT = new PPSMUserAssessmentDataSet.UserPunishInfoDataTable();
            var ad = new UserPunishInfoTableAdapter();
            userPunishDT = ad.GetUserPunishDataByName(userName);
            return userPunishDT;
        }

        public PPSM2007CodeDataSet.T_PPSM2007CODEDataTable GetCodeDescByCategoryAndValue(string category, string value)
        {
            var dt = new PPSM2007CodeDataSet.T_PPSM2007CODEDataTable();
            base.Helper.Fill(dt, "P_PPSM2007Code_GetDescByValue", category, value);
            return dt;
        }

        public PPSM2007CodeDataSet.T_PPSM2007CODEDataTable GetPPSM2007CodeTable()
        {
            var dt = new PPSM2007CodeDataSet.T_PPSM2007CODEDataTable();
            base.Helper.Fill(dt, "P_PPSM2007CodeTable");
            return dt;
        }

        

    }
}
